<template>
    <div>
        <ul>
            <li>
                <router-link to="/All_contacts">All_contacts</router-link>
            </li>
            <li>
                <router-link to="/Alice">Alice</router-link>
            </li>
            <li>
                <router-link to="/Bob">Bob</router-link>
            </li>
        </ul>
        <button @click="checkFn">随机显示</button>
        <router-view></router-view>
    </div>
</template>

<script>

export default {
    data(){
        return {
            arr:['/All_contacts','/Alice','/Bob']
        }
    },
    methods:{
        checkFn(){
            this.$router.push({
                path:this.arr[Math.floor(Math.random() *3)]
            })
        }
    }
}
</script>

<style>

</style>